package com.neuedu.controller;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neuedu.entity.PmsRegist;
import com.neuedu.entity.UmsDoctor;
import com.neuedu.service.PmsRegistService;
import com.neuedu.service.UmsDoctorService;
import com.neuedu.vo.ResultJson;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 医生表 前端控制器
 * </p>
 *
 * @author 王禹
 * @since 2025-08-08
 */
@RestController
@RequestMapping("/umsDoctor")
public class UmsDoctorController {
    @Resource
    UmsDoctorService umsDoctorService;
    @Resource
    PmsRegistService pmsRegistService;
    @PostMapping("/login")
    ResultJson<String> login(String username, String password) {
        return ResultJson.success(umsDoctorService.login(username, password));
    }
    @GetMapping("/getRegisterByDoctorId")
    ResultJson<List<PmsRegist>> getRegisterByDoctorId(Long open_id, Byte registTime) {
        return ResultJson.success(pmsRegistService.getRegisterByDoctorId(open_id, registTime));
    }
    @GetMapping("/call")
    ResultJson<Boolean> call(String message) {
        return ResultJson.success(umsDoctorService.call(message));
    }
}
